Signal trackers have been the source of difficult to identify leaks in
the past. Having access to the list of all active signal trackers at run
time without having to modify and rebuild gnome-shell can be very
valuable in identifying the source of these leaks, especially since the
steps required to trigger a leak might not always be obvious.
Related: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6423
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4169>
destroyableTypes.push(gtype);
}
+
+/**
+ * A debug function that can be used to inspect signal trackers at run time
+ *
+ * @returns {Map<object, SignalTracker>}
+ */
+export function debugGetSignalTrackers() {
+ return SignalManager.getDefault()._signalTrackers;
+}